public class User {
    private int zhanghao;
    private int code;
    private String ux;

    public User(int zhanghao, int code, String ux) {
        this.zhanghao = zhanghao;
        this.code = code;
        this.ux = ux;
    }

    public User(int zhanghao, int code) {
        this.zhanghao = zhanghao;
        this.code = code;
        this.ux = "";
    }

    public void say() {
        System.out.println("用户的账号是" + this.zhanghao +
                ", 该用户密码是" + this.code +
                ", 该用户的邮箱是" + this.ux);
    }

    public void setZhanghao(int zhanghao) {
        this.zhanghao = zhanghao;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setUx(String ux) {
        this.ux = ux;
    }

    public static void main(String[] args) {
        User u1 = new User(1, 123456, "123@cc.com");
        u1.say();

        User u2 = new User(2, 456789);
        u2.setUx("456@cc.com");
        u2.say();
    }
}
